package com.crm.controller.before_sale;

import com.crm.pojo.SalePlan;
import com.crm.service.before_sale.SalePlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by dr5hx on 2018/8/9
 */
@Controller
public class SalePlanController {
    @Autowired
    private SalePlanService salePlanService;

    /**
     * 返回一个对应客户的所有销售计划
     *
     * @param cid
     * @return
     */
    @PostMapping("getCustomerPlan")
    @ResponseBody
    public List<SalePlan> showSalePlan(Long cid) {
        return salePlanService.showCustomerPlan(cid);
    }
}
